home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 1541 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.9 KB  |  117 lines

  1. Path: mail2news.demon.co.uk!cliffe.demon.co.uk
  2. From: Steven Chapman <steve@cliffe.demon.co.uk>
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: More
  5. Date: Sat, 20 Jan 96 17:49:21 GMT
  6. Message-ID: <9601201749.AA00046@cliffe.demon.co.uk>
  7. X-NNTP-Posting-Host: cliffe.demon.co.uk
  8. X-NewsSoftware: GRn 2.1 19/2/94 (PostNews Fix 31/3/95 Martin Hunt)
  9. MIME-Version: 1.0
  10. Content-Type: text/plain; charset=iso-8859-1
  11. Content-Transfer-Encoding: 8bit
  12. X-Mail2News-Path: relay-4.mail.demon.net!post.demon.co.uk!cliffe.demon.co.uk
  13.  
  14.  
  15.  
  16. Thanks for the last lot of help but i am looking for something like this
  17. but when i try too compile it i get 
  18.  
  19. SAS/C Amiga Compiler 6.56
  20. Copyright (c) 1988-1995 SAS Institute Inc.
  21.  
  22. ====================
  23.         if(!(fh = fopen("T:xx", "w")))
  24. Work-1:Steve1.c 41 Warning 225: pointer type mismatch
  25.                                 "BPTR" does not match "struct __iobuf *"
  26. Slink - Version 6.56
  27. Copyright (c) 1988-1995 SAS Institute, Inc.  All Rights Reserved.
  28.  
  29.  
  30. SLINK Complete - Maximum code size = 5624 ($000015f8) bytes
  31.  
  32. Final output file size = 6100 ($000017d4) bytes
  33.  
  34.  
  35. What i am trying too achive is too make a Front End for Amitcp
  36. like Control Panel but using ToolType's for the config and
  37. all output goes too a listview.
  38.  
  39. THANKS for any help.
  40.  
  41. ------------------------------------------------
  42.  
  43.  
  44. #include <stdio.h>
  45. #include <stdlib.h>
  46. #include <string.h>
  47.  
  48. #include <dos/dos.h>
  49. #include <dos/dostags.h>
  50. #include <exec/exec.h>
  51. #include <intuition/intuition.h>
  52. #include <libraries/gadtools.h>
  53. #include <rexx/errors.h>
  54. #include <rexx/rexxio.h>
  55. #include <rexx/rxslib.h>
  56. #include <rexx/storage.h>
  57.  
  58. #include <clib/dos_protos.h>
  59. #include <clib/exec_protos.h>
  60. #include <clib/intuition_protos.h>
  61. #include <clib/gadtools_protos.h>
  62. #include <clib/rexxsyslib_protos.h>
  63. #include <clib/alib_protos.h>
  64.  
  65. #include <workbench/startup.h>
  66. #include <workbench/workbench.h>
  67. #include <workbench/icon.h>
  68. #include <clib/icon_protos.h>
  69.  
  70. #define VERSION 37
  71.  
  72. extern struct WBStartup *WBenchMsg;
  73.  
  74. struct Library *IconBase;
  75.  
  76. int main(int argc, char **argv)
  77. {
  78.  struct WBArg      *wbarg;
  79.  struct DiskObject *dobj;
  80.  UBYTE             **tools,*textp;
  81.  BPTR           fh;
  82.  LONG           argnum;
  83.  
  84.     if(!(fh = fopen("T:xx", "w")))
  85.         exit(10);
  86.         IconBase = OpenLibrary((UBYTE *)"icon.library",VERSION);
  87.     if(!IconBase) {
  88.         Close(fh);
  89.         exit(10);
  90.     }
  91.         wbarg = WBenchMsg->sm_ArgList;
  92.     argnum = WBenchMsg->sm_NumArgs;
  93.  
  94.  
  95.         dobj = GetDiskObject((UBYTE *)wbarg->wa_Name);
  96.         tools = (UBYTE **)dobj->do_ToolTypes;
  97.         textp = FindToolType(tools,(UBYTE *)"PROG"); 
  98.  
  99.     Execute (textp,0,fh);
  100.     FreeDiskObject(dobj);
  101.  
  102.  
  103.     CloseLibrary(IconBase);
  104.     Delay(200);
  105.     Close(fh);
  106.  
  107. }
  108. -------------------------------------
  109.  
  110. -- 
  111. =========================================================
  112. |  Steven Chapman - steve@cliffe.demon.co.uk (Private ) |
  113. | Amiga 4000/030, Workbench 3.1, Kickstart 3, 1 Gig HD  |
  114. |          4 meg Fast Ram, 2 Meg Chip Ram.              |
  115. =========================================================
  116.  
  117.